package com.zhangyu.shadow.repair.delegate.irregular;


import com.zhangyu.shadow.repair.base.IStringDataConvert;
import com.zhangyu.shadow.repair.delegate.bean.VehicleBean;

import java.util.ArrayList;

import io.reactivex.disposables.Disposable;
import st.lib.base.delegate.mvp.BaseModel;
import st.lib.base.delegate.mvp.BasePresenter;
import st.lib.base.delegate.mvp.BaseView;
import st.lib.base.net.callback.IError;
import st.lib.base.ui.recycler.MultipleItemEntity;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/7
 */
public interface IrregularBusContract {

    interface View extends BaseView {
        void getVehicleListSuccess(ArrayList<VehicleBean> list);

        void getVehicleListFailed(int code, String msg);
    }

    interface Model extends BaseModel {
        Disposable searchBus(String code,
                             IStringDataConvert<ArrayList<MultipleItemEntity>> success,
                             IError error);

        Disposable getHistoryList(
                String url,
                ArrayList<String> busVmTypeName,
                ArrayList<Integer> classificationId,
                String depId,
                String code,
                String dateStart,
                String dateEnd,
                int busVmType,
                IStringDataConvert<ArrayList<VehicleBean>> success,
                IError error);

        Disposable getVehicleList(
                String url,
                String depId,
                String code,
                String dateStart,
                String dateEnd,
                int busVmType,
                String minDate,
                int id,
                IStringDataConvert<ArrayList<VehicleBean>> success,
                IError error);
    }

    abstract class Presenter extends BasePresenter {
        abstract void getVehicleList(int type,String code,String deptId,String minDate,int id);
    }
}
